Function Reference

_TimeToTicks

Converts the specified hours, minutes, and seconds to ticks.

#include <Date.au3>
_TimeToTicks([$iHours = @Hour, [$iMins = @Min, [$iSecs = @Sec]]])

 

Parameters

$iHours The hours.
$iMins The minutes.
$iSecs The seconds.

 

Return Value

Success: Returns the number of ticks.
Failure: Returns 0.
@Error: 0 = No error.
1 = The specified hours, minutes, or seconds are not valid.

 

Remarks

None.

 

Related

_TicksToTime

 

Example


#include <Date.au3>
Global $Sec, $Min, $Hour, $Time
; calculate with time
$StartTicks = _TimeToTicks(@HOUR,@MIN,@SEC)
; calculate 45 minutes later
$EndTicks = $StartTicks + 45 * 60 * 1000
_TicksToTime($EndTicks,$Hour,$Min,$Sec)
MsgBox(262144,'' , 'New Time:' &  $Hour & ":" & $Min & ":" & $Sec)